﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<!-- start nav-right -->

<div id="nav-right">
 
<div class="user-info">
      <% var loginAcc = this.Session[JLL.China.Application.Constants.Session_User] as JLL.China.Model.Admin; %>
        <% if (loginAcc != null)
           {  %>
        Welcome, <b>
            <%=loginAcc.UserName%></b>
        <%}
           else
           {%>

        <script type="text/javascript">            window.location.href = '<%=Url.Content("~/Home/")%>LogOff';</script>

        <%} %>
        <%  string ControllerName = Html.ViewContext.Controller.ValueProvider.GetValue("controller").RawValue.ToString();
            string ActionName = Html.ViewContext.Controller.ValueProvider.GetValue("action").RawValue.ToString();
            string currentUrl = ControllerName;
           if (loginAcc != null)
           {  if (!HelperUtility.CheckPermission(currentUrl,ActionName, loginAcc.UserName))
               {
        %>

        <script type="text/javascript">
            window.location.href = '<%=Url.Content("~/") %>'; 
        </script>

        <%
            }}
                 
        %>
    <ul class="unstyled">
       
        <li><a href="<%=Url.Content("~/")%>Portal/Admin/Profile/<%=(loginAcc!=null)?loginAcc.UserName:""%>">Admin Profile</a></li>
        
        <li><a href="<%=Url.Content("~/Home/")%>LogOff">Logout</a></li>
    </ul>
</div>
    <!--  end account-content -->
</div>
<!-- end nav-right -->
<!--  start nav -->
<div class="nav">
    <div class="table">
         <% if (loginAcc != null)
            { %>
            <%=HelperUtility.GetMenuByGroup((int)loginAcc.GroupFid,Url.Content("~/")) %>
           <% } %>
       <%-- <ul id="jsddm" class="sf-menu">
            <li class="current"><a href="<%=Url.Content("~/")%>Home">Dashboard</a> </li>
            <li ><a href="#">Project Directory</a>
                <ul >
                    <li class=""><a href="<%=Url.Content("~/")%>Listings/ProjectDirectoryLocal/Index/1">
                        Local </a></li>
                    <li class=""><a href="<%=Url.Content("~/")%>Listings/ProjectDirectoryInt/Index/1">International</a></li>
                </ul>
            </li>
            <li ><a href="#">Property Listings</a>
                <ul >
                    <li class="min-width"><a href="<%=Url.Content("~/")%>Listings/Property">Local Resale</a></li>
                    <li  class="min-width"><a href="<%=Url.Content("~/")%>Listings/Project">Local Project</a></li>
                    <li  class="min-width"><a href="<%=Url.Content("~/")%>Listings/PropertyInternational">International Resale </a></li>
                    <li  class="min-width"><a   href="  Listings/ProjectInternational">International Project</a></li>
                </ul>
            </li>
            <li ><a href="<%=Url.Content("~/Portal/")%>Admin">User Role</a> </li>
            <li ><a href="#">Article & Ads</a>
                <ul >
                    <li><a href="<%=Url.Content("~/Portal/")%>">News</a></li>
                    <li><a href="<%=Url.Content("~/Portal/")%>Researches">Researches</a></li>
                    <li><a href="<%=Url.Content("~/Portal/")%>Services">Services</a></li>
                    <li><a href="<%=Url.Content("~/Portal/")%>HomeBanner/">Banner Ads</a>
                        <ul>
                            <li><a href="<%=Url.Content("~/Portal/")%>HomeBanner/">Home Banner</a></li>
                            <li><a href="<%=Url.Content("~/Portal/")%>GlobalBanner/">Global Banner</a></li>
                            <li><a href="<%=Url.Content("~/Portal/")%>SideContent/Index/1">Dynamic Banner</a></li>
                       
                            <li><a href="<%=Url.Content("~/Portal/")%>SideContent/Index/2">Static Banner</a></li>
                        </ul>
                    </li>
                     
                </ul>
            </li>
            <li><a href="<%=Url.Content("~/Portal/")%>Event">Events</a></li>   
             <li><a style="cursor: pointer">Newsletter </a>
              <ul >
                  <li><a style="min-width: 148px"  href="<%=Url.Content("~/Portal/")%>Newsletter/Local" >Local Newsletter</a></li>  
                  <li><a style="min-width: 148px" href="<%=Url.Content("~/Portal/")%>Newsletter/International" >International Newsletter</a></li>  
            </ul>
             </li>   
            <li><a>Settings</a>
            <ul >
                <li><a href="<%=Url.Content("~/Portal/")%>Pages" >Pages</a></li>
                 <li><a href="<%=Url.Content("~/Portal/FormEmail/")%>" >Email</a></li>
                
            </ul>
            </li>
          
        </ul>--%>
    </div>
    <div class="clear">
    </div>
</div>
<!--  start nav -->
